<template>
  <!-- svg：图标外围容器，user：使用哪个图标 -->
  <svg :style="{ width, height }">
    <use :xlink:href="prefix + name" fill="red"></use>
  </svg>
</template>

<script setup lang="ts">
defineProps({
  prefix: {
    type: String,
    default: '#icon-',
  },
  name: String,
  width: {
    type: String,
    default: '30px',
  },
  height: {
    type: String,
    default: '30px',
  },
})
</script>
<style scoped></style>
